﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UpdatePanelWithTrigger.aspx.cs" Inherits="Chapter19.Example06.UpdatePanelWithTrigger" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
            <div>
                <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            </div>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Label ID="label1" runat="server" Text="Label" />
                    <asp:Button ID="button1" runat="server" Text="按钮" OnClick="OnButtonClick" />
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="button2" EventName="Click" />
                </Triggers>
            </asp:UpdatePanel>
        <div>
            <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Label ID="label2" runat="server" Text="Labe2" />
                    <asp:Button ID="button2" runat="server" Text="按钮" OnClick="OnButtonClick" />
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </form>
</body>
</html>
